1. Field of the Invention
The presently disclosed subject matter relates to an imaging device provided with a single-plate type of color imaging element, and in more detail, relates to an imaging device which obtains a pixel value of a defective pixel from a pixel value of a peripheral pixel in a periphery of the defective pixel by interpolation processing.
2. Description of the Related Art
There are many imaging devices such as a digital camera, which are provided with a single-plate type of color imaging element that takes an object image formed on an imaging surface by a photographing optical system. On the imaging surface of the single-plate type of color imaging element, a large number of red (R), green (G) and blue (B) pixels are arrayed according to a predetermined pattern (see Japanese Patent Laid-Open No. 2009-027684). In the single-plate type of color imaging element, color filters each having a single color are provided on each of the pixels, and accordingly each of the pixels has color information only on the single color. Because of this, an output image of the color imaging element becomes an RAW image (mosaic image), and accordingly a multichannel image is obtained by interpolation processing (also referred to as synchronization processing or demosaic processing, hereafter the same) that interpolates a pixel of which the color is lost (hereinafter referred to as missing pixel), from a peripheral pixel.
In the color imaging element, there is the case where such a pixel exists as not to output a signal, or as to output a high level of a dark output due to a dark current or the like, in other words, a so-called defective pixel exists, due to various causes (for instance, crack) in a manufacturing process. At this time, when the peripheral pixel of the missing pixel is a defective pixel, accurate color information on the missing pixel cannot be obtained. Because of this, the pixel value (output value) of the defective pixel is not used, but the interpolation processing is performed which interpolates the pixel value by using a pixel value in a peripheral pixel having the same color as that of the defective pixel, which is positioned in the periphery.
The imaging device described in Japanese Patent Laid-Open No. 2001-036821 performs the interpolation processing when an exposure time is within a standard exposure time, based on a result of having detected the defective pixel, which has been obtained beforehand; and on the other hand, when the exposure time is longer than the standard exposure time, performs a test photography, detects the defective pixel and performs the interpolation processing based on the detection result.
The imaging device described in Japanese Patent Laid-Open No. 2002-330353 detects the defects, stores the defective pixels in EEPROM sequentially from the defective pixel having a higher level of defect; and performs the interpolation processing sequentially from the defective pixel having the higher level of defect, based on the defective pixel information stored in the EEPROM.